package com.yic.module.system.controller.admin.logger.vo.externallog;

import com.alibaba.excel.annotation.ExcelProperty;
import com.yic.framework.excel.core.annotations.DictFormat;
import com.yic.framework.excel.core.convert.DictConvert;
import lombok.Data;

import java.time.LocalDateTime;


/**
 * 第三方API调用日志 Excel VO
 *
 * @author 系统管理员
 */
@Data
public class ExternalLogExcelVO {

    @ExcelProperty("序号")
    private Long id;

    @ExcelProperty(value = "系统类型", converter = DictConvert.class)
    @DictFormat("external_system_type") // TODO 代码优化：建议设置到对应的 XXXDictTypeConstants 枚举类中
    private Integer systemType;

    @ExcelProperty("操作名称")
    private String name;

    @ExcelProperty("请求url")
    private String url;

    @ExcelProperty("请求参数")
    private String requset;

    @ExcelProperty("响应参数")
    private String response;

    @ExcelProperty("响应状态码")
    private String code;

    @ExcelProperty("响应描述")
    private String description;

    @ExcelProperty("请求开始时间")
    private LocalDateTime startTime;

    @ExcelProperty("请求结束时间")
    private LocalDateTime endTime;

    @ExcelProperty("耗时")
    private Integer duration;

    @ExcelProperty(value = "执行状态", converter = DictConvert.class)
    @DictFormat("system_integer_status") // TODO 代码优化：建议设置到对应的 XXXDictTypeConstants 枚举类中
    private Integer status;

    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
